function gridToolPanel_AddContainer(h, content, varargin )
%GRIDTOOLPANEL_ADDCONTAINER Summary of this function goes here
%   Detailed explanation goes here

% h - Toolpanel handle
% cantent - content handle
% varargin - width

%TODO: Create a better behaviour when adding content

switch nargin
    case 2, width= NaN;
    case 3, width= varargin{1};
end

h_gridsize= get(h, 'gridsize');
h_gridsize(2)= h_gridsize(2)+1; % add a column
set(h, 'gridsize', h_gridsize);

h_columndefinitions= getappdata(h, 'columndefinitions');
h_columndefinitions(end + 1)= h_columndefinitions(end);
h_columndefinitions(end - 1)= width;
setappdata(h, 'columndefinitions', h_columndefinitions);

set(content, 'parent', h);
end

